import java.util.HashSet;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-12-03
 * Time: 17:07
 */
public class Demo2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        while(scan.hasNext()) {
            String str1 = scan.nextLine();
            String str2 = scan.nextLine();

            HashSet<String> set = new HashSet<>();
            for(int i = 0; i < str1.length(); i++) {
                String str = "";
                if(str1.charAt(i) == '"') {
                    while(i+1 < str1.length() && str1.charAt(i+1) != '"') {
                        str += str1.charAt(i+1);
                        i++;
                    }
                    i++;
                    set.add(str);
                }else {
                    if( str1.charAt(i) != ',') {
                        while(i < str1.length() && str1.charAt(i) != ',') {
                            str += str1.charAt(i);
                            i++;
                        }
                        set.add(str);
                    }
                }
            }
            if(set.contains(str2)) {
                System.out.println("Ignore");
            }else {
                System.out.println("Important!");
            }
        }
    }
}
